package com.project.rfidpage.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.project.rfidpage.dto.*;
import com.project.rfidpage.mapper.RidLivMapper;
import com.project.rfidpage.service.RidLivService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RidLivServiceImpl implements RidLivService {

    @Resource
    private RidLivMapper ridLivMapper;

    @Override
    @DS("secondary")
    public List<RidLivDto> getListForPage(RidLivParam param) {
        return ridLivMapper.selectListByUid(param);
    }

    @Override
    @DS("master")
    public List<RidTidLivDto> getTidListForPage(RidTidLivParam param) {
        return ridLivMapper.selectTidListByUid(param);
    }

    @Override
    @DS("master")
    public List<RidTidDetailLivDto> getDetialListByBgno(RidTidLivParam param) {
        return ridLivMapper.selectDetailListByBgno(param);
    }
}
